<script type="text/javascript" src="<?php echo URL::base() . 'media/js/ckeditor/ckeditor.js' ?>"></script>
<?php echo form::open($action, array('enctype' => 'multipart/form-data')); ?>
        <ul>
            <li>
                <?php echo form::label('description', 'Tag leírása:'); ?><br />
                <?php echo $ckeditor->editor("description", @$user->description, $config) ?>
                <?php if(isset($errors['description']))echo ($errors['description']) ?>
            </li>
            <li>
                <?php echo form::label('telephone', 'Telefonszám:'); ?>
                <?php if(isset($user)) echo form::input('telephone', $user->telephone); else echo form::input('telephone');?>
                <?php if(isset($errors['telephone']))echo ($errors['telephone']) ?>
            </li>
             <li>
                <?php echo form::label('room', 'Szobaszám:'); ?>
                <?php if(isset($user)) echo form::input('room', $user->room); else echo form::input('room');?>
                <?php if(isset($errors['room']))echo ($errors['room']) ?>
            </li>
            
                <?php if(!empty($user->image)){ ?>
                <li>
                    <label>Fénykép:</label><br/>
                    <?php echo html::image('upload/users/'.$user->image, array('width' => '300')) ?><br />
                </li>
                <li><?php echo form::label('image', 'Profilkép megváltoztatása:'); ?>       
                    <input type="file" name="image" /><br/>
                </li>
                <?php }else{ ?>
                <li>
                    <?php echo form::label('image', 'Profilkép feltöltése:'); ?>
                    <input type="file" name="image"/>
                </li>
                <?php } ?>
            <li>
                <?php echo form::submit('save', 'Mentés');?>
            </li>    
        </ul>
    <?php echo form::close(); ?>